//
//  MovieDetailView.m
//  豆瓣
//
//  Created by dllo on 15/10/31.
//  Copyright © 2015年 蓝鸥科技. All rights reserved.
//

#import "MovieDetailView.h"

@implementation MovieDetailView

- (void)dealloc
{   [_plot_simple release];
    [_genres release];
    [_country release];
    [_runtime release];
    [_rating release];
    [_rating_count release];
    [_release_date release];
    [_actors release];
    [_headImageView release];
    [super dealloc];
}

-(instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self createSubViews];
    }
    return self;
}

-(void)createSubViews{
    
    UILabel *ratingLabel = [[UILabel alloc]initWithFrame:CGRectMake(150, 20, 40, 18)];
    ratingLabel.font = [UIFont systemFontOfSize:16];
    ratingLabel.text = @"评分:";
    [self addSubview:ratingLabel];
    [ratingLabel release];
    
    self.rating = [[UILabel alloc]initWithFrame:CGRectMake(190, 20, 70, 18)];
    self.rating.font = [UIFont systemFontOfSize:16];
    [self addSubview:self.rating];
    [_rating release];
    
    self.rating_count = [[UILabel alloc]initWithFrame:CGRectMake(230, 20, 120, 18)];
    self.rating_count.font = [UIFont systemFontOfSize:16];
    [self addSubview:self.rating_count];
    [_rating_count release];
    
    self.release_date = [[UILabel alloc]initWithFrame:CGRectMake(150, 50, 120, 18)];
    self.release_date.font = [UIFont systemFontOfSize:16];
    [self addSubview:self.release_date];
    [_release_date release];
    
    self.runtime = [[UILabel alloc]initWithFrame:CGRectMake(150, 80, 120, 18)];
    self.runtime.font = [UIFont systemFontOfSize:16];
    [self addSubview:self.runtime];
    [_runtime release];
    
    self.genres = [[UILabel alloc]initWithFrame:CGRectMake(150, 110, 120, 18)];
    self.genres.font = [UIFont systemFontOfSize:16];
    [self addSubview:self.genres];
    [_genres release];
    
    self.country = [[UILabel alloc]initWithFrame:CGRectMake(150, 140, 120, 18)];
    self.country.font = [UIFont systemFontOfSize:16];
    [self addSubview:self.country];
    [_country release];
    
    UILabel *actorsLabel = [[UILabel alloc]initWithFrame:CGRectMake(20, 190, 80, 30)];
    actorsLabel.text = @"制作人";
    actorsLabel.font = [UIFont boldSystemFontOfSize:20];
    [self addSubview:actorsLabel];
    [actorsLabel release];
    
    self.actors = [[UILabel alloc]initWithFrame:CGRectMake(20, 220, 335, 70)];
    self.actors.font = [UIFont systemFontOfSize:16];
    self.plot_simple.numberOfLines = 0;
    [self addSubview:self.actors];
    [_actors release];
    
    UILabel *plotLabel = [[UILabel alloc]initWithFrame:CGRectMake(20, 290, 80, 30)];
    plotLabel.text = @"电影情节";
    plotLabel.font = [UIFont boldSystemFontOfSize:20];
    [self addSubview:plotLabel];
    [plotLabel release];
    
    self.plot_simple = [[UILabel alloc]initWithFrame:CGRectMake(20, 320, 335, 300)];
    self.plot_simple.font = [UIFont systemFontOfSize:16];
    self.plot_simple.numberOfLines = 0;
    [self addSubview:self.plot_simple];
    [_plot_simple release];
    
    self.headImageView = [[UIImageView alloc]initWithFrame:CGRectMake(25, 20, 100, 160)];
    self.headImageView.backgroundColor = [UIColor grayColor];
    [self addSubview:self.headImageView];
    [self.headImageView release];
    
}




/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
